package com.damage.common.service.impl;

import com.damage.common.entity.*;
import com.damage.common.mapper.IPublicMapper;
import com.damage.common.service.IPublicService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PublicServiceImpl implements IPublicService {

    @Autowired
    private IPublicMapper mapper;

    @Override
    public Supplier findSupplierById(Integer supplierId) {
        return mapper.findSupplierById(supplierId);
    }

    @Override
    public List<SupplyGood> findSupplyGoodBySupplierId(Integer supplierId) {
        return mapper.findSupplyGoodBySupplierId(supplierId);
    }

    @Override
    public SupplyGood findSupplyGoodById(Integer supplyGoodId) {
        return mapper.findSupplyGoodById(supplyGoodId);
    }

    @Override
    public PurchasePlan findPurchasePlanById(Integer purchasePlanId) {
        return mapper.findPurchasePlanById(purchasePlanId);
    }

    @Override
    public List<PurchasePlanDetail> findDetailByPurchasePlanId(Integer purchasePlanId) {
        return mapper.findDetailByPurchasePlanId(purchasePlanId);
    }

    @Override
    public Order findOrderById(Integer orderId) {
        return mapper.findOrderById(orderId);
    }

    @Override
    public List<OrderDetail> findDetailByOrderId(Integer orderId) {
        return mapper.findDetailByOrderId(orderId);
    }

    @Override
    public PurchaseInvoice findPurchaseInvoiceById(Integer purchaseInvoiceId) {
        return mapper.findPurchaseInvoiceById(purchaseInvoiceId);
    }

    @Override
    public List<Order> findOrderByState(Integer state) {
        return mapper.findOrderByState(state);
    }
}
